projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc25d15
)
(insert-file): Report error if file is directory.
author
Richard M. Stallman
<rms@gnu.org>
Sat, 19 Jun 1993 19:07:19 +0000
(19:07 +0000)
committer
Richard M. Stallman
<rms@gnu.org>
Sat, 19 Jun 1993 19:07:19 +0000
(19:07 +0000)
lisp/files.el
patch
|
blob
|
history
diff --git
a/lisp/files.el
b/lisp/files.el
index dc07a02473a2636deacc336b9ba304d5ee38f203..3782a79472723b14aeb5aaed5fa40375c12fec63 100644
(file)
--- a/
lisp/files.el
+++ b/
lisp/files.el
@@
-1550,6
+1550,9
@@
This function is meant for the user to run interactively.
Don't call it from programs! Use `insert-file-contents' instead.
\(Its calling sequence is different; see its documentation)."
(interactive "fInsert file: ")
+ (if (file-directory-p filename)
+ (signal 'file-error (list "Opening input file" "file is a directory"
+ filename)))
(let ((tem (insert-file-contents filename)))
(push-mark (+ (point) (car (cdr tem))))))